#!/bin/bash
# 

container_id=`docker ps -a | grep httpserver | awk '{print $1}'`
if [ -n "${container_id}" ]; then 
    docker stop ${container_id}
    docker rm -f ${container_id} 
fi
docker run -d --name httpserver -e HTTP_PORT=${HTTP_PORT} -e VERSION=${VERSION} -p 8080:8080 httpserver:${VERSION}
